Replace it with the already existing gtk_widget_snapshot_child.
gtk_container_child_notify_by_pspec
gtk_container_forall
gtk_container_propagate_draw
-gtk_container_snapshot_child
gtk_container_get_focus_chain
gtk_container_set_focus_chain
gtk_container_unset_focus_chain
gtk_widget_list_action_prefixes
gtk_widget_get_action_group
gtk_widget_measure
+gtk_widget_snapshot_child
<SUBSECTION>
gtk_widget_get_path
gtk_button_box_snapshot_forall (GtkWidget *child,
gpointer snapshot)
{
- gtk_container_snapshot_child (GTK_CONTAINER (gtk_widget_get_parent (child)),
- child,
- snapshot);
+ gtk_widget_snapshot_child (gtk_widget_get_parent (child),
+ child,
+ snapshot);
}
static gboolean
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
- gtk_container_snapshot_child (GTK_CONTAINER (widget),
- priv->box, snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->box, snapshot);
return FALSE;
}
gtk_container_snapshot_forall (GtkWidget *child,
gpointer snapshot)
{
- gtk_container_snapshot_child (GTK_CONTAINER (_gtk_widget_get_parent (child)),
- child,
- snapshot);
+ gtk_widget_snapshot_child (_gtk_widget_get_parent (child),
+ child,
+ snapshot);
}
static void
cairo_restore (cr);
}
-/**
- * gtk_container_snapshot_child:
- * @container: a #GtkContainer
- * @child: a child of @container
- * @snapshot: $GtkSnapshot as passed to the container. In particular, no
- * calls to gtk_snapshot_translate_2d() should have been applied by the
- * parent.
- *
- * When a container receives a call to the snapshot function, it must send
- * synthetic #GtkWidget::snapshot calls to all children. This function
- * provides a convenient way of doing this. A container, when it receives
- * a call to its #GtkWidget::snapshot function, calls
- * gtk_container_snapshot_child() once for each child, passing in
- * the @snapshot the container received.
- *
- * gtk_container_snapshot_child() takes care of translating the origin of
- * @snapshot, and deciding whether the child needs to be snapshot. It is a
- * convenient and optimized way of getting the same effect as calling
- * gtk_widget_snapshot() on the child directly.
- **/
-void
-gtk_container_snapshot_child (GtkContainer *container,
- GtkWidget *child,
- GtkSnapshot *snapshot)
-{
- int x, y;
-
- g_return_if_fail (GTK_IS_CONTAINER (container));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (_gtk_widget_get_parent (child) == GTK_WIDGET (container));
- g_return_if_fail (snapshot != NULL);
-
- gtk_container_get_translation_to_child (container, child, &x, &y);
-
- gtk_snapshot_translate_2d (snapshot, x, y);
- gtk_widget_snapshot (child, snapshot);
- gtk_snapshot_translate_2d (snapshot, -x, -y);
-}
-
/**
* gtk_container_get_path_for_child:
* @container: a #GtkContainer
void gtk_container_propagate_draw (GtkContainer *container,
GtkWidget *child,
cairo_t *cr);
-GDK_AVAILABLE_IN_3_90
-void gtk_container_snapshot_child (GtkContainer *container,
- GtkWidget *child,
- GtkSnapshot *snapshot);
GDK_AVAILABLE_IN_ALL
void gtk_container_set_focus_chain (GtkContainer *container,
#include "gtkfixed.h"
#include "gtkcontainerprivate.h"
+#include "gtkwidgetprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
{
child = list->data;
- gtk_container_snapshot_child (GTK_CONTAINER (fixed),
- child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ child->widget,
+ snapshot);
}
}
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
return gtk_widget_has_visible_focus (widget);
}
GtkNotebookPrivate *priv = notebook->priv;
if (gtk_notebook_has_current_page (notebook))
- gtk_container_snapshot_child (GTK_CONTAINER (notebook),
- priv->cur_page->child,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->cur_page->child,
+ snapshot);
return FALSE;
}
widget = gtk_css_gadget_get_owner (gadget);
- gtk_container_snapshot_child (GTK_CONTAINER (widget),
- page->tab_label,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ page->tab_label,
+ snapshot);
return gtk_widget_has_visible_focus (widget) &&
GTK_NOTEBOOK (widget)->priv->cur_page == page;
gdk_window_get_height (priv->child1_window)
),
"GtkPanedChild1");
- gtk_container_snapshot_child (GTK_CONTAINER (widget), priv->child1, snapshot);
+ gtk_widget_snapshot_child (widget, priv->child1, snapshot);
gtk_snapshot_pop_and_append (snapshot);
}
gdk_window_get_height (priv->child2_window)
),
"GtkPanedChild2");
- gtk_container_snapshot_child (GTK_CONTAINER (widget), priv->child2, snapshot);
+ gtk_widget_snapshot_child (widget, priv->child2, snapshot);
gtk_snapshot_pop_and_append (snapshot);
}
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
}
static void
#include "gtksettingsprivate.h"
#include "gtksnapshot.h"
#include "gtktypebuiltins.h"
+#include "gtkwidgetprivate.h"
#include "fallback-c89.c"
transition = effective_transition (revealer);
if (transition == GTK_REVEALER_TRANSITION_TYPE_NONE)
{
- gtk_container_snapshot_child (GTK_CONTAINER (revealer), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
}
else
{
gtk_widget_get_allocated_height (widget)
),
"RevealerClip");
- gtk_container_snapshot_child (GTK_CONTAINER (revealer), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
gtk_snapshot_pop_and_append (snapshot);
}
}
char *name;
gtk_snapshot_push (snapshot, TRUE, "GtkStackCrossFadeEnd");
- gtk_container_snapshot_child (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->visible_child->widget,
+ snapshot);
end_node = gtk_snapshot_pop (snapshot);
if (priv->last_visible_node)
&GRAPHENE_RECT_INIT(x, y, width, height),
"StackUnder");
- gtk_container_snapshot_child (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->visible_child->widget,
+ snapshot);
gtk_snapshot_pop_and_append (snapshot);
gtk_snapshot_pop_and_append (snapshot);
}
- gtk_container_snapshot_child (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->visible_child->widget,
+ snapshot);
}
static void
gtk_snapshot_pop_and_append (snapshot);
}
else
- gtk_container_snapshot_child (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->visible_child->widget,
+ snapshot);
}
return FALSE;
toolbar_content_snapshot (content, GTK_CONTAINER (widget), snapshot);
}
- gtk_container_snapshot_child (GTK_CONTAINER (widget),
- priv->arrow_button,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->arrow_button,
+ snapshot);
return FALSE;
}
widget = GTK_WIDGET (content->item);
if (widget)
- gtk_container_snapshot_child (container, widget, snapshot);
+ gtk_widget_snapshot_child (GTK_WIDGET (container), widget, snapshot);
}
static gboolean
{
GtkTreeViewChild *child = list->data;
- gtk_container_snapshot_child (GTK_CONTAINER (tree_view), child->widget, snapshot);
+ gtk_widget_snapshot_child (widget, child->widget, snapshot);
}
gtk_snapshot_pop_and_append (snapshot);
if (gtk_tree_view_column_get_visible (column))
{
button = gtk_tree_view_column_get_button (column);
- gtk_container_snapshot_child (GTK_CONTAINER (tree_view),
- button, snapshot);
+ gtk_widget_snapshot_child (widget,
+ button, snapshot);
}
}
if (tree_view->priv->drag_window)
{
button = gtk_tree_view_column_get_button (tree_view->priv->drag_column);
- gtk_container_snapshot_child (GTK_CONTAINER (tree_view),
- button, snapshot);
+ gtk_widget_snapshot_child (widget,
+ button, snapshot);
}
gtk_style_context_restore (context);
*y_out = y;
}
+/**
+ * gtk_widget_snapshot_child:
+ * @widget: a #GtkWidget
+ * @child: a child of @widget
+ * @snapshot: $GtkSnapshot as passed to the container. In particular, no
+ * calls to gtk_snapshot_translate_2d() should have been applied by the
+ * parent.
+ *
+ * When a widget receives a call to the snapshot function, it must send
+ * synthetic #GtkWidget::snapshot calls to all children. This function
+ * provides a convenient way of doing this. A widget, when it receives
+ * a call to its #GtkWidget::snapshot function, calls
+ * gtk_widget_snapshot_child() once for each child, passing in
+ * the @snapshot the widget received.
+ *
+ * gtk_widget_snapshot_child() takes care of translating the origin of
+ * @snapshot, and deciding whether the child needs to be snapshot. It is a
+ * convenient and optimized way of getting the same effect as calling
+ * gtk_widget_snapshot() on the child directly.
+ **/
void
gtk_widget_snapshot_child (GtkWidget *widget,
GtkWidget *child,
GDK_AVAILABLE_IN_3_90
void gtk_widget_set_focus_child (GtkWidget *widget,
GtkWidget *child);
+GDK_AVAILABLE_IN_3_90
+void gtk_widget_snapshot_child (GtkWidget *widget,
+ GtkWidget *child,
+ GtkSnapshot *snapshot);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRequisition, gtk_requisition_free)
GtkCallback callback,
gpointer user_data);
-void gtk_widget_snapshot_child (GtkWidget *widget,
- GtkWidget *child,
- GtkSnapshot *snapshot);
-
-
/* inline getters */
static inline gboolean
(window_border.top + window_border.bottom + title_height));
if (priv->title_box != NULL)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), priv->title_box, snapshot);
+ gtk_widget_snapshot_child (widget, priv->title_box, snapshot);
if (gtk_bin_get_child (GTK_BIN (widget)))
- gtk_container_snapshot_child (GTK_CONTAINER (widget), gtk_bin_get_child (GTK_BIN (widget)), snapshot);
+ gtk_widget_snapshot_child (widget, gtk_bin_get_child (GTK_BIN (widget)), snapshot);
for (l = priv->popovers; l; l = l->next)
{
GtkWindowPopover *data = l->data;
- gtk_container_snapshot_child (GTK_CONTAINER (widget), data->widget, snapshot);
+ gtk_widget_snapshot_child (widget, data->widget, snapshot);
}
gtk_debug_updates_snapshot (widget, snapshot);